package com.hera.process.config.service.impl;

import java.util.List;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hera.base.util.FiltroDTO;
import com.hera.process.config.dao.StageUserDao;
import com.hera.process.config.service.StageUserService;
import com.hera.process.workflow.domain.StageUser;

@Service("stageuserservice")
public class StageUserServiceImpl implements StageUserService {

	static final Logger logger = Logger.getLogger(StageUserServiceImpl.class);

	@Autowired
	private StageUserDao stageuserdao;
	
	@Override
	public StageUser findById(Long id) {
		
		return stageuserdao.findOne(id);
	}

	@Override
	public void update(StageUser entity) {
		
		stageuserdao.save(entity);
	}

	@Override
	public void save(StageUser entity) {
		
		stageuserdao.save(entity);
	}

	@Override
	public void delete(StageUser entity) {
		
		stageuserdao.delete(entity);
	}

	@Override
	public List<StageUser> findAll() {
		
		return stageuserdao.findAll();
	}

	@Override
	public List<StageUser> findAll(FiltroDTO filtroDTO) {
		
		return stageuserdao.obtenerEntidadesPorFiltros(filtroDTO);
	}

	@Override
	public List<StageUser> findByStageIdStage(Long idStage) {
		// TODO Auto-generated method stub
		return stageuserdao.findByStageIdStage(idStage);
	}
	
}
